//import cn.hutool.core.collection.CollUtil;
//import cn.hutool.extra.mail.MailAccount;
//import cn.hutool.extra.mail.MailUtil;
//import lombok.SneakyThrows;
//import org.apache.commons.mail.DefaultAuthenticator;
//import org.apache.commons.mail.SimpleEmail;
//
//import java.security.Security;
//
///**
// * @author fzh
// * @version v1
// * @program: platform
// * @className Mail
// * @description
// * @site
// * @company
// * @create 2021-11-15 19:41
// */
//public class Mail {
////    @SneakyThrows
////    public static void main(String[] args) {
//////        send();
////        System.setProperty("https.protocols", "TLSv1.3,TLSv1.2,TLSv1.1,TLSv1,SSLv3,SSLv2Hello");
////        Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
////        MailAccount account = new MailAccount();
////        account.setHost("smtpdm.aliyun.com");
////        account.setPort(465);
////        account.setAuth(true);
////        account.setFrom("");
////        account.setUser("");
////        account.setPass("");
////        account.setSslEnable(true);
////        account.setSocketFactoryPort(465);
////        account.setSocketFactoryClass("javax.net.ssl.SSLSocketFactory");
////        account.setSslProtocols("TLSv1.3 TLSv1.2 TLSv1.1 TLSv1 SSLv3 SSLv2Hello");
////        account.setSocketFactoryFallback(false);
////        account.setDebug(true);
////        account.setStarttlsEnable(true);
////
////        MailUtil.send(account, CollUtil.newArrayList("120910322@qq.com"), "测试", "邮件来自Hutool测试", false);
////    }
//
//
////    @SneakyThrows
////    public static void main(String[] args) {
////        SimpleEmail email= new SimpleEmail();
////        email.setHostName("smtp.gmail.com");
////        email.setSmtpPort(587);
////        email.setTLS(true);
//////        email.setSslSmtpPort("587");
////        email.setAuthenticator(new DefaultAuthenticator("longingforloveservice@gmail.com", "qaweszx..0.."));
//////        email.setSSLOnConnect(true);
////        email.setFrom("longingforloveservice@gmail.com");
////        email.setSubject("TestMail");
////        email.setMsg("This is a test mail ... :-)");
////        email.addTo("1311983543@qq.com");
////        email.setDebug(true);
////        email.send();
////        System.out.println("send suc!");
////    }
//}
